package com.infotech.NginxMonitor.action;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.infotech.NginxMonitor.service.SystemInfo;

public class Monitoring extends HttpServlet{

	/**
	 * 
	 */
	private static final long serialVersionUID = -2838575680529237663L;

	public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException{
		response.setContentType("text/html;charSet=UTF-8");
		SystemInfo systemInfo = new SystemInfo();
		systemInfo.startMonitoring();
		PrintWriter out = response.getWriter();
		out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
		out.println("<HTML>");
		out.println("  <HEAD><TITLE>test monitoring</TITLE></HEAD>");
		out.println("  <BODY>");
		out.println("begin monitoring<br>");
		out.println("</BODY>");
		out.println("</HTML>");
		out.flush();
		out.close();
	}
}
